package zfbapprouter

import (
	"github.com/gin-gonic/gin"
	"yundian/internel/pkg/dingo"
)

type HnxmH5Router struct {
}

func NewHnxmH5Router() *HnxmH5Router {
	return &HnxmH5Router{}
}

func (w *HnxmH5Router) Init(e *gin.Engine) *gin.Engine {
	apiRouters := w.Include(InitAuthRouter(), InitAppRouter(), InitStaffAppRouter())
	g := e.Group("v1")
	for _, f := range apiRouters {
		f(g)
	}
	return e
}

func (w *HnxmH5Router) Include(opts ...dingo.ApiRouter) []dingo.ApiRouter {
	apiRouters := make([]dingo.ApiRouter, 0)
	apiRouters = append(apiRouters, opts...)
	return apiRouters
}
